package util
{
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;

	public class Long
	{
		public var high:uint;
		public var low:uint;

		public function Long(high:uint = 0, low:uint = 0)
		{
			this.high = high;
			this.low = low;
		}

		public static function read(data:IDataInput):Long
		{
			var mylong:Long = new Long(0, 0);
			mylong.high = data.readUnsignedInt();
			mylong.low = data.readUnsignedInt();
			return mylong;
		}

		public function write(data:IDataOutput):void
		{
			data.writeUnsignedInt(high);
			data.writeUnsignedInt(low);
		}

		public function isEqual(value:Long):Boolean
		{
			return value.high == this.high && value.low == this.low;
		}
	}
}